import time
import jwt
import time, hmac, hashlib, json
#app_key_name = "f72d922ff2a54f60"
app_key_id = "f72d922ff2a54f60"
app_key_secret = "a3553ae65a044d50ac33bdc6c2f8c99a"
#app_key = "a3553ae65a044d50ac33bdc6c2f8c99a"
def generate_jwt_token(app_key_id, app_key_secret, algorithm="HS256"):
    current_time = int(time.time() * 1000)
    # print(current_time)
    payload = {
        "iat": current_time,
        "key_name": app_key_id
    }
    token = jwt.encode(payload, app_key_secret, algorithm=algorithm)
    return token.decode("utf-8")
if __name__ == "__main__":
    print(generate_jwt_token(app_key_id, app_key_secret))